<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/style.css" />
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/ckform.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/common.js"></script>
       
   
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form class="form-inline definewidth m20">    
  
    &nbsp;  
   
    
</form>
 <div>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>序号</th>
        <th>用户名</th>
        <th>角色</th>
        <th>操作</th>
    </tr>
    </thead>
   <tbody>
     <c:forEach items="${QueryUserInfo}" var="eachUser" varStatus="st">
	     <tr>
            <td>${st.index+1 }</td>
            <td>${eachUser.username }</td>
            <td>
            <c:choose>
            <c:when test="${eachUser.userrole==0}">管理员</c:when>
            <c:when test="${eachUser.userrole==1}">操作员</c:when>
            <c:otherwise>用户</c:otherwise>
            </c:choose>
            </td>
            <td>
                 <a href="adminEdit.do?uid=${eachUser.userid }">编辑</a>   
                <a href="adminDelete.do?uid=${eachUser.userid }" onclick="return confirm('你确认删除吗?');">删除</a>             
            </td>
        </tr>
      </c:forEach>
   </tbody>	
</table>
<div style="padding-top: 30px;padding-left: 25px">
<button type="button" onclick="javascript:window.location.href='redirect.do?page=userInfoQuery'">返回</button>
</div>
</div> 
</body>
</html>
